/**
 * Copyright phonemap.com
 *
 * Licensed under the phonemap.com License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.phonemap.com/licenses/LICENSE-1.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.phonemap;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.fileupload.FileUploadException;


/**
 * The Class UploadFileServlet.
 */
@SuppressWarnings("serial")
public class UploadFileServlet extends BaseServlet {
	
	/* (non-Javadoc)
	 * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        try {
            processRequest(request, response);
        } catch (FileUploadException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
     
     /**
      * Process request.
      *
      * @param request the request
      * @param response the response
      * @throws ServletException the servlet exception
      * @throws IOException Signals that an I/O exception has occurred.
      * @throws FileUploadException the file upload exception
      */
     protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, FileUploadException {

         Properties properties = new Properties();
         properties.load(new FileInputStream("C:\\Users\\IBM_ADMIN\\workspace\\XMLGenerator\\FTFXmlGenerator\\ftf.properties"));
//         String imageDir = properties.getProperty("images");
//         HttpSession session = request.getSession(true);
//         String version = session.getAttribute("frameworkVersion").toString();
         System.out.println(request.getParameter("currPackage"));
         System.out.println(request.getParameter("currClass"));
     }

}
